USE ConsultTracking
go
-------------------------------------------------
DECLARE @DoStuffName nvarchar(100)
DECLARE @DoStuffDescription nvarchar(300)

SET @DoStuffName = 'Manager'
SET @DoStuffDescription = ''
EXECUTE [ConsultTracking].[dbo].[CreateDoStuff] 
   @DoStuffName
  ,@DoStuffDescription

SET @DoStuffName = 'Consultant'
SET @DoStuffDescription = ''
EXECUTE [ConsultTracking].[dbo].[CreateDoStuff] 
   @DoStuffName
  ,@DoStuffDescription



-------------------------------------------------
DECLARE @Logon nvarchar(15)
DECLARE @CustomerID int

SET @Logon = 'Administrator'
EXECUTE CreateUser
   @Logon

SET @Logon = 'leonards'
EXECUTE CreateUser
   @Logon

SET @Logon = 'brian'
EXECUTE CreateUser
   @Logon

SET @Logon = 'sydney'
EXECUTE CreateUser
   @Logon

SET @Logon = 'eric'
EXECUTE CreateUser
   @Logon

SET @Logon = 'testmanager'
EXECUTE CreateUser
   @Logon

SET @Logon = 'testconsultant'
EXECUTE CreateUser
   @Logon

SET @Logon = 'testcostomer'
SET @Customerid = 1
EXECUTE CreateUser
   @Logon,
   @CustomerID
-------------------------------------------------
DECLARE @UserID int
DECLARE @DoStuffID int
DECLARE @Doable bit
SET @UserID = 1
SET @DoStuffID = 1
SET @Doable = 1

WHILE (@UserID < 5)
BEGIN
	WHILE (@DoStuffID < 5)
		BEGIN
			EXECUTE [ConsultTracking].[dbo].[SETUserDoStuff] 
			   @UserID
			  ,@DoStuffID
			  ,@Doable;
				
				SET @DoStuffID = @DoStuffID + 1
				CONTINUE
		END
		SET @UserID = @UserID + 1
		SET @DoStuffID = 1
		CONTINUE
END
--------------------------------------------------
DECLARE @LogOnName nvarchar(15)
DECLARE @Modified smalldatetime

SET @UserID = 2
SET @LogonName = 'Leonard'
SET @CustomerID = null
SET @Modified  = getdate();

EXECUTE [ConsultTracking].[dbo].[UpdateUser] 
   @UserID
  ,@LogOnName
  ,@CustomerID
  ,@Modified
